<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        document.onmousewheel = wheelHander;//非火狐
        var img = document.getElementsByTagName('img')[0];
        // 非火狐实现滚轮效果
        function wheelHander(e) {
            oEvent = window.event;
            if (oEvent.wheelDelta) {
                console.log("向上滚动");
            } else {
                console.log("向下滚动");
            }
        }
    </script>
</body>

</html>